#ifndef __MSP_GPIO_H__
#define __MSP_GPIO_H__

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32f1xx_ll_gpio.h"

/* Define --------------------------------------------------------------------*/
// 状态指示LED
#define YELLOW_LED_PIN                      LL_GPIO_PIN_13
#define YELLOW_LED_PORT                     GPIOC
#define GREEN_LED_PIN                        LL_GPIO_PIN_10
#define GREEN_LED_PORT                       GPIOA

// 状态指示LED
#define YELLOW_LED_ON()                       LL_GPIO_ResetOutputPin(YELLOW_LED_PORT, YELLOW_LED_PIN)
#define YELLOW_LED_OFF()                      LL_GPIO_SetOutputPin(YELLOW_LED_PORT, YELLOW_LED_PIN)
#define GREEN_LED_ON()                       LL_GPIO_ResetOutputPin(GREEN_LED_PORT, GREEN_LED_PIN)
#define GREEN_LED_OFF()                      LL_GPIO_SetOutputPin(GREEN_LED_PORT, GREEN_LED_PIN)
// #define GET_DTR_4G_STATE()                  LL_GPIO_IsInputPinSet(DTR_4G_PORT, DTR_4G_PIN)
// #define GET_RI_4G_STATE()                   LL_GPIO_IsInputPinSet(RI_4G_PORT, RI_4G_PIN)

// test
// #define OUT_12V_Toggle()                    LL_GPIO_TogglePin(PWR_CRL_PORT, PWR_CRL_PIN)
// #define MCU_OUT_Toggle()                    LL_GPIO_TogglePin(MCU_OUT_PORT, MCU_OUT_PIN)
// #define DTR_4G__Toggle()                    LL_GPIO_TogglePin(DTR_4G_PORT, DTR_4G_PIN)
// #define U4_4G_0_Toggle()                    LL_GPIO_TogglePin(GPIOA, LL_GPIO_PIN_0)
// #define U4_4G_1_Toggle()                    LL_GPIO_TogglePin(GPIOA, LL_GPIO_PIN_1)

/* Declare -------------------------------------------------------------------*/
void MSP_GPIO_Init(void);

#ifdef __cplusplus
}
#endif
#endif /*__ GPIO_H__ */

